package demobusi.com.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.demoapi.api.IControleService;

@Controller  
@RequestMapping("/busi")
public class BusiController {
	@Resource  
	private IControleService controlImpl ;
	
	@RequestMapping(value="/btest.do",method=RequestMethod.GET)  
	public String testBusi(String str) {
		System.err.println("****从busi层 控制**************");
		System.err.println("***busi 接收 前台传递的参数***"+str);
		String rtnStr = controlImpl.execute("张三");
		System.err.println("**后台返回的***:"+rtnStr);
		return "index";
	}
	@RequestMapping(value="/param.do",method=RequestMethod.GET)
	public String test(HttpServletRequest request){  
		int userId = Integer.parseInt(request.getParameter("id"));  
        String userName = request.getParameter("userName");  
        System.err.println("************userId:"+userId);
        System.err.println("***********userName:"+userName);
        return "";
	}
}
